package com.yunchang.springboot.mapper.amazonAdvert;

import com.yunchang.springboot.models.DO.AmazonAdvBrandsCampaignReport;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface AmazonAdvBrandsCampaignReportMapper {
    int deleteByPrimaryKey(Long id);

    int insert(AmazonAdvBrandsCampaignReport record);

    int insertSelective(AmazonAdvBrandsCampaignReport record);

    AmazonAdvBrandsCampaignReport selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(AmazonAdvBrandsCampaignReport record);

    int updateByPrimaryKey(AmazonAdvBrandsCampaignReport record);

    /**
     * 获取表中当前日期的数据数量，用来判断是否已经有数据
     * */
    Integer getDataCountFromBrandsCampaignReport(@Param("sellerId") String sellerId, @Param("area") String area, @Param("date") String date);

    /**
     * 删除表中指定店铺指定区域指定时间的数据
     * */
    void deleteDataFromBrandsCampaignReportBySellerIdAreaDate(@Param("sellerId") String sellerId, @Param("area") String area, @Param("date") String date);

}